package com.qinsong.myapplication;

import android.app.Application;
import android.content.Context;

import com.hyphenate.chat.EMOptions;
import com.hyphenate.easeui.EaseUI;
import com.qinsong.myapplication.model.Model;

public class IMApplication extends Application {
    private  static  Context mContext;
    @Override
    public void onCreate() {
        super.onCreate();
        EMOptions options = new EMOptions();
        //设置需要同意后才能接受邀请
        options.setAcceptInvitationAlways(false);
        EaseUI.getInstance().init(this,options);

        //初始化数据模型
        Model.getInstance().init(this);
        //初始化全局上下文
        mContext = this;
    }
    //获取全局上下文对象
    public static Context getGlobalApplication(){
        return  mContext;
    }
}
